<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
  <caption>用户列表</caption>
  <tr>
    <th>用户名</th>
    <th>密码</th>
    <th>昵称</th>
  </tr>
</table>
<script>
  let arr = [{uesrname:"tom",password:"123456",nickname:"汤姆"},
    {uesrname:"jerry",password:"abcdef",nickname:"杰瑞"},
    {uesrname:"lucy",password:"aabbcc",nickname:"露西"}]
  let table = document.querySelector("table");
  for (let p of arr) {

    let tr = document.createElement("tr");
    let username = document.createElement("td");
    let password = document.createElement("td");
    let nickname = document.createElement("td");
    username.innerText=p.uesrname;
    password.innerText=p.password;
    nickname.innerText=p.nickname;
    tr.append(username,password,nickname);
    table.append(tr);

  }
</script>

</body>
</html>